package com.loren.demo10.service;

import com.loren.demo10.aspect.Param;
import com.loren.demo10.aspect.SupportScript;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

@Slf4j
@Service
public class TestService {

    @Param
    public void testParams(long id, Map<String, Object> mapInfo) {
        log.info("id = {}, mapInfo = {}", id, mapInfo);
    }

    @SupportScript(value = "test-script", label = "脚本测试")
    public Map<String, Object> testScript(long id) {
        Map<String, Object> mapInfo = new HashMap<>();
        mapInfo.put("id", id);
        mapInfo.put("name", "Loren");
        return mapInfo;
    }
}
